import request from '@/utils/request'

// 查询购物卡列表
export function listShopCard(query) {
  return request({
    url: '/mall/shopCard/list',
    method: 'get',
    params: query
  })
}

// 查询购物卡详细
export function getShopCard(shopId) {
  return request({
    url: '/mall/shopCard/' + shopId,
    method: 'get'
  })
}

// 新增购物卡
export function addShopCard(data) {
  return request({
    url: '/mall/shopCard',
    method: 'post',
    data: data
  })
}

// 修改购物卡
export function updateShopCard(data) {
  return request({
    url: '/mall/shopCard',
    method: 'put',
    data: data
  })
}

// 删除购物卡
export function delShopCard(shopId) {
  return request({
    url: '/mall/shopCard/' + shopId,
    method: 'delete'
  })
}
